import axios from '@/libs/request/axios'
// 获取用户数据 多条件
export const getUserListData = (params) => {
    return axios.request({
        url: '/admin/applyUser/getUserListData',
        data: params,
        method: 'post'
    })
}

// 获取用户数据 多条件
export const getUserListDataTemp = (params) => {
    return axios.request({
        url: '/admin/applyUser/getUserListDataTemp',
        data: params,
        method: 'post'
    })
}
// 添加用户
export const addUser = (params) => {
    return axios.request({
        url: '/admin/applyUser/addUserTemp',
        data: params,
        method: 'post'
    })
}
// 编辑用户
export const editUser = (params) => {
    return axios.request({
        url: '/admin/applyUser/editUser',
        data: params,
        method: 'post'
    })
}

// 编辑用户
export const editUserTemp = (params) => {
    return axios.request({
        url: '/admin/applyUser/editUserTemp',
        data: params,
        method: 'post'
    })
}

export const getUserPhotoByMD5 = (params) => {
    return axios.request({
        url: '/admin/comAttachementFile/getUserPhotoByMD5',
        data: params,
        method: 'post'
    })
}
// 启用用户
export const enableUser = (id, params) => {
    return axios.request({
        url: `/admin/applyUser/enable/${id}`,
        data: params,
        method: 'post'
    })
}
// 禁用用户
export const disableUser = (id, params) => {
    return axios.request({
        url: `/admin/applyUser/disable/${id}`,
        data: params,
        method: 'post'
    })
}

// 批量禁用
export const upAllByIds = (ids) => {
    return axios.request({
        url:`/admin/applyUser/upAllByIds/${ids}`,
        method: 'delete'
    })
}
// 重置用户密码
export const passWord = (id) => {
    return axios.request({
        url:`/admin/applyUser/passWord/${id}`,
        method: 'delete'
    })
}
// 删除用户
export const deleteUser = (ids, params) => {
    return axios.request({
        url: `/admin/applyUser/delByIds/${ids}`,
        params: params,
        method: 'delete'
    })
}
